﻿@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>


<ul id="manualUploadModeExample" class="unstyled"></ul>



@section scripts
{
    
    

    @Styles.Render("~/fineuploader/fineuploader-3.5.0.css")
    @Scripts.Render("~/fineuploader/jquery.fineuploader-3.5.0.js")
    @Scripts.Render("~/fineuploader/iframe.xss.response-3.5.0.js")

    <script>
        $(document).ready(function() {

            var errorHandler = function(event, id, fileName, reason) {
                qq.log("id: " + id + ", fileName: " + fileName + ", reason: " + reason);
            };


            var uploader2 = new qq.FineUploader({
                element: $('#manualUploadModeExample')[0],
                autoUpload: true,
                uploadButtonText: "Select Files",
                request: {
                    endpoint: "/FineUploader/UploadFile",
                    params: { "extraParam1": "true", "extraParam2": "212" },
                    customHeaders: { Accept: 'application/json' }
                },
                callbacks: {
                    onError: errorHandler,

                    onComplete: function (id, fileName, responseJSON) {
                        if (responseJSON.success) {
                            alert();
                            alert(responseJSON.extraInformation);
                        }
                    }
                },
               
            });


        });
    </script>
}

